1. Technical Field of the Invention
This disclosure relates in general to overclocking, and more particularly, to a method and apparatus for dynamically changing the clock frequency of a CPU when the CPU is running in an overclocked mode.
2. Description of the Related Art
“Overclocking” is a term that is commonly used to refer to the process of resetting a processor-based system so that the processor runs faster than the speed specified by the manufacturer. Overclocking is possible because processor manufacturers typically label the speeds of their processors somewhat conservatively. For example, a processor that is advertised to have a speed of 166 MHz may in fact be successfully run in an overclocking mode at 200 MHz.
Overclocking is frequently accomplished by resetting the system bus speed to a slightly higher level. After the system bus is reset, the processor is often able to successfully adjust to the higher system bus speed.
In some cases the processor may also be overclocked by programming an I2C (Inter-IC) register interface after the system boots up. An example of this is illustrated with reference to FIG. 1 and Table 1.
FIG. 1 is a block diagram illustrating some components of a conventional clock synthesizer 100. The clock synthesizer 100 includes an M-counter 102, a Phase Frequency Detector (PFD)/Charge Pump (CP) 104, a Loop Filter (LF) 106, a Voltage Controlled Oscillator (VCO) 108, an F-counter 110, and an N-counter 112.
The input frequency FREF is divided by the value in M-counter 102 before feeding into PFD/CP 104. Through the PFD/CP 104, the LF 106, and VCO 108, the frequency is multiplied by the value in N-counter 112. The output frequency FCPU is taken from the VCO 108 after being divided by the value in F-counter 110. Assuming that the clock synthesizer 100 achieves an initial output frequency FCPU of 100 MHz upon startup, a user may subsequently place the processor in an overclocking mode by setting the value of N-counter 112 to a value other than 200. In other words, FCPU may be calculated using the following equation:FCPU=(FREF*N-counter)/(M-counter*F-counter)  [EQ. 1]
Table I below lists example frequencies that can be achieved from VCO 108 and from F-counter 110 (FCPU) given a specific value of 60 for the M-counter 102, a specific value of 8 for the F-counter 110, a specific input frequency FREF of 240 MHz, and variable values of the N-counter 112.
TABLE IM-F-N-VCOFREFcountercountercounter108FCPUΔ FDAF(MHz)102110112(MHz)(MHz)(MHz)240608200800100024060820481610222406082128481066240608220880110102406082289121141424060823694411818240608250100012525
Thus, according to the above example, users are able to change the frequency of the processor in discrete steps between 100 and 125 MHz. This conventional method of placing the processor in an overclocking mode may be referred to as “dial-a-frequency,” or DAF. The N-counter value of 200 in the first row of Table I represents the default value, since it was assumed that the processor achieves 100 MHz upon start up. Accordingly, when the N-counter value is 200, the additional frequency component ΔFDAF added to the default value of 100 MHz is zero.
One of the dangers of overclocking the processor according to the above example is thermal runaway. Thermal runaway occurs when the system generates heat faster than it can dissipate the generated heat. An overclocked processor typically generates more heat than one running at the manufacturer-specified speed, which makes thermal runaway more likely to occur. Accordingly, the user must be aware of the processor temperature, continuously monitoring the heat generated by the processor and ready to intervene when levels approaching thermal runaway are present. When the temperature approaches one that can put the processor in thermal runaway, the operator reduces the operating speed of the processor.
Currently, no technology exists to allow the system to dynamically change the CPU speed without user intervention while the processor is running in an overclocked mode. Embodiments of the invention address these and other disadvantages that are inherent in the above-described art.